﻿using Microsoft.SemanticKernel;
using System.ComponentModel;
using System.Text.Json.Serialization;

namespace Mozhi.Agent.DeepSeek.Plugins
{
    public class SupplierPlugin
    {
        private readonly List<Supplier> suppliers = new()
        {
            new Supplier { Id = Guid.Parse("00b7187e-fd0f-32e8-5568-bf86ffc9016a"), Name = "杭州哇哈哈饮料有限公司" },
            new Supplier { Id = Guid.Parse("fecb4326-f426-8fce-1e6a-7b166b3570a1"), Name = "长沙旺旺食品有限公司" },
        };

        [KernelFunction("get_suppliers")]
        [Description("Gets a list of supplier")]
        public async Task<List<Supplier>> GetSuppliersAsync()
        {
            return suppliers;
        }
    }

    public class Supplier
    {
        [JsonPropertyName("id")]
        public Guid Id { get; set; }

        [JsonPropertyName("name")]
        public string Name { get; set; }
    }
}
